import request from '@/utils/request'

// 查询账单列表
export function listBillView(query) {
  return request({
    url: '/bill/billView/list',
    method: 'get',
    params: query
  })
}

// 查询账单详细
export function getBillView(billId) {
  return request({
    url: '/bill/billView/' + billId,
    method: 'get'
  })
}

// 新增账单
export function addBillView(data) {
  return request({
    url: '/bill/billView',
    method: 'post',
    data: data
  })
}

// 修改账单
export function updateBillView(data) {
  return request({
    url: '/bill/billView',
    method: 'put',
    data: data
  })
}

// 删除账单
export function delBillView(billId) {
  return request({
    url: '/bill/billView/' + billId,
    method: 'delete'
  })
}

// 统计数据
export function totalBillInfo(startTime, endTime) {
  return request({
    url: '/bill/billView/totalBillInfo',
    method: 'get',
    params: {
      startTime: startTime,
      endTime: endTime
    }
  })
}

// 统计数据
export function totalBillInfoList(row) {
  return request({
    url: '/bill/billView/totalBillInfoList',
    method: 'post',
   data:row
  })
}